//SnakeLite.c
#include <avr/io.h>
#include <util/delay.h>
#include <avr/stdio.h>     //New to be used later
int main (void)
{
	DDRD = 0xFF;		 //Set Port D for Output
	PORTD = 0;			//Turn both Motors Off
	DDRB = 0xFF;		//Set Port B for Output
	PORTB = 0;			//Turn off LED's
	
	for (int i = 1; i <= 10; i = i + 1)		//Pause to let
	{											//you get your 
		_delay_loop_2(30000);					//hand out of the way
		
	
	 PORTD = 0;			//Both Motors still off	
	 PORTB = 1;			//One LED On
		
	for (int i = 1; i <= 700; i = i + 1)
	{
		PORTD = 3;
		_delay_loop_2(250); 	//Both Motors on very slightly
		PORTD = 1;
		_delay_loop_2(1400); 	//On Motor on for longer gently turns
		
	}
	PORTD = 0;					//Stop both motors flutterbot will coast slightly
	PORTB = 0;					//Turn off 1st LED
	PORTB = 2;					//Turn on 2nd LED
	for (int i =1; i <= 700; i = i + 1)
	{
		PORTD = 3;
		_delay_loop_2(250);
		PORTD = 2;
		_delay_loop_2(1400);  //opposite Motor on for longer gently turns opposite way
		
	}
	PORTD = 0;		//Motors Off
	PORTB = 0;		//Leds Off
	}				
}

